When the color of a photographed image is shifted from an original color, there is performed processing to convert the color of each pixel in the image into the original color. This processing is called color correction. Methods of realizing the color correction include a method of photographing a sample containing a known color (hereinafter, called reference color) together with an object at the same time, for example, and converting the color of each pixel into an original color according to the change of the reference color.
However, the number of colors which each pixel of the image may take is huge, and it is difficult to set all the possible colors to the reference colors and to preliminarily convert each of the reference colors into an original color. Therefore, when the above method is applied, the processing of obtaining conversion for the color of each pixel (hereinafter, input color) from conversion for the reference color is performed by interpolation processing of obtaining the input color from preliminarily provided reference colors, and the color correction is performed for the input color according to the obtained conversion.
For example, there is a method of converting the input color by volume interpolation. This method sets a solid having reference colors at apexes in a color space, and obtains the conversion of the input color utilizing the conversion of the reference colors which are the apexes of the solid including the input color. When this method is applied, the accuracy of the color correction becomes better as the distances between the reference colors used in the correction processing and the input color are smaller. Accordingly, as a method of improving the accuracy in the color correction, there has been proposed a method of photographing a large number of reference colors so as to allow many solids to be set in the color space.
Japanese Laid-open Patent Publication No. 2000-48179
The above method by the volume interpolation converts the input color by the linear interpolation utilizing a relationship between the coordinates of the reference colors in the color space and the coordinates of the input color. Therefore, the interpolation processing according to this method does not use information except the coordinates in the color space.
The relationship between the reference color and the input color depends on environment such as the kind of a light source used in image capturing (e.g., sun light, fluorescent light, incandescent light bulb, or the like), for example. When the spectrum distribution characteristic (spectrum) of a light source, the reflection characteristic of an object, or the spectral sensitivity characteristic of an imaging element is changed, for example, and a pair of same colors is captured, the relationship between the colors obtained from the captured image is changed.
By such an environment change, an error may be caused in the color correction when the method by the above volume interpolation is applied. However, the influence of the change in the reflection characteristic of the object or the spectral sensitivity characteristic of the imaging element is smaller than the influence of the change in the spectrum distribution characteristic of the light source. Accordingly, identifying the light source in the image capturing increases the possibility of achieving a highly accurate color correction that is performed according to the light source.